package advice;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

public class AfterReturningService implements AfterReturningAdvice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("===================后置增强start====================");
        System.out.println(target+"的"+method.getName()+"方法被执行了，参数是："+
                Arrays.toString(args)+"返回值是："+returnValue);
        System.out.println("===================后置增强end====================");
    }
}
